//
//  XUISplitView.h
//  etionUI
//
//  Created by WangJian on 14-12-16.
//  Copyright (c) 2014年 GuangZhouXuanWu. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "XUISplitViewDefine.h"

@class XUISplitView;
@protocol XUISplitViewDelegate <NSObject>

@optional

- (BOOL)splitView:(XUISplitView *)splitView contentViewAtIndex:(NSInteger)index statusWillChangeFrom:(XUISplitViewContentStatus)curStatus to:(XUISplitViewContentStatus)newStatus;
- (void)splitView:(XUISplitView *)splitView contentViewAtIndex:(NSInteger)index statusDidChangeFrom:(XUISplitViewContentStatus)curStatus to:(XUISplitViewContentStatus)newStatus;

@end

@interface XUISplitView : UIView

@property (nonatomic, assign) id<XUISplitViewDelegate> delegate;
@property (nonatomic, assign) NSInteger leftViewIndex;

- (UIView *)contentViewAtIndex:(NSInteger)index;

- (void)setLeftViewIndex:(NSInteger)index animated:(BOOL)animated;

- (void)addContentView:(UIView *)contentView;
- (void)removeLastContentView;

/**
 *  移动指定的content view到左边，目前只支持移动一格
 */
- (void)moveContentViewAtIndexToLeft:(NSInteger)index animated:(BOOL)animated;

//- (void)replaceContentViewAtIndex:(NSInteger)index withNewContentView:(UIView *)newContentView animated:(BOOL)animated;

- (void)deleteLastContentViewWithAnimated:(BOOL)animated;

@end
